import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
import A from '@/views/aA.vue'
import B from '@/views/bB.vue'
// const original = VueRouter.prototype.replace
 
// VueRouter.prototype.replace = function replace(location) {
//   return original.call(this, location).catch(err => err)
// }
const routes= [
    {
        path: '/aA',
        component:A // 这里指定了默认路由为A组件
    },
    {
        path:'/bB',
        component:B,
        name:'componentB'
    },

]
const router=new VueRouter({
    routes,
})
export default router